<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="error.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/log.css" type="text/css" rel="stylesheet" />
<link href="css/font.css" type="text/css" rel="stylesheet" />
<script language="javascript">
window.onload = function()
{
	 var pass = document.login.pass;
	 var passMess = document.getElementById("passMess");
	 var name = document.login.name;
	 var nameMess = document.getElementById("nameMess");
	 if(name.value.length<1)
	 {
	 	 nameMess.style.display = 'block';
	 }
	 else
	 {
	  	 nameMess.style.display = 'none';
	 }
	 if(pass.value.length<1)
	 {
	 	 passMess.style.display = 'block';
	 }
	 else
	 {
	  	 passMess.style.display = 'none';
	 }
}
</script>
</head>
<body background="image/1f8eac0fe4b4fbdfab6457c6.jpg">
<div id="logdiv" style="margin-left:auto; margin-top:auto;">
  <form name="login" id="login" action="log.jsp" method="post">
    <div id="name">      
      <div id="nameInput" class="nM">
        <input type="text" class="ui_textinput" name="name" id="name" onfocus="nClick();document.getElementById('logMess').style.display='none'" onblur="nOut();" />
      </div>
	  <label id="nameMess" style="position:absolute;top:287px;left:785px;"> <font color="#CCCCCC" class="myFont">请输入您的账号</font> </label>
    </div>	
	
    <div id="pass">      
      <div id="passInput" class="mM">
        <input type="password" name="pass" id="pass" class="ui_textinput" onfocus="pClick();document.getElementById('logMess').style.display='none'" onblur="pOut();" />
      </div>
	  <label id="passMess" style="position:absolute;top:347px;left:785px;"> <font color="#CCCCCC" class="myFont">请输入您的密码</font> </label>
    </div>
	
	<div id="logImg">
	<img src="image/qzonelogin.png" onclick="check(document.login);" style="position:absolute;top:395px;left:780px;" />
	<font class="myFont" color="#FF0000" style="display:none;position:absolute;top:243px;left:780px;" id="logMess">账号或者密码不能为空！</font>
	</div>
  </form>
</div>
</body>
</html>
<script language="javascript">
function check(vform)
{	 
      var name = document.login.name;
	  var pass = document.login.pass;
	  var logMess = document.getElementById("logMess");
	  if(name.value.length<1||pass.value.length<1)
	  {
	        logMess.style.display = "block";
	  }
	  else
	  {
	         vform.submit();
	  }
}
function nClick()
{
     var name = document.login.name;
	 var nameMess = document.getElementById("nameMess");
//	 nameMess.style.display = "none";
     if(nameMess.style.display == "none")
	 {
	 	 if(name.value.length>0)
	 	 {
	     	   nameMess.style.display = "none";
	 	 }
	 	 else
	 	 {
	     	   nameMess.style.display = "block";
	 	 }
	 }
	 else
	 {
	      nameMess.style.display = "none"
	 }
}
function nOut()
{
     var name = document.login.name;
	 var nameMess = document.getElementById("nameMess");
	 if(name.value.length<1)
	 {
	       nameMess.style.display = "block";
	 }
	 else
	 {
	       nameMess.style.display = "none";
	 }
}
function pClick()
{
	 var pass = document.login.pass;
	 var passMess = document.getElementById("passMess");
	 if(passMess.style.display == "none")
	 {
	 	 if(pass.value.length>0)
	 	 {
	 	       passMess.style.display = "none";
	 	 }
	 	 else
	 	 {
	 	       passMess.style.display = "block";
	 	 }
	 }
	 else
	 {
	      passMess.style.display = "none"
	 }
}
function pOut()
{
	 var pass = document.login.pass;
	 var passMess = document.getElementById("passMess");
	 if(pass.value.length<1)
	 {
	       passMess.style.display = "block";
	 }
	 else
	 {
	       passMess.style.display = "none";
	 }
}
</script>